package cn.edu.hunau.oop.day02;


import org.junit.Test;

/**
 * @author hb
 * @date 2025-08-04 16:49:30
 */
public class PointTest {
    @Test
    public void test01(){
      Point p1=new Point();
      System.out.println(p1.x+" "+p1.y);
    }

    @Test
    public void test02(){
        Point p2=new Point();
        p2.x=1;
        p2.y=2;

        Point p3=new Point(1,2);

        Point p4=new Point(100);
    }

    @Test
    public void test03(){
        Point p1 =new Point();
        Point p2=new Point(3,4);
        //p2到p1的距离  p2.distance(p1);
        double d=p1.distance(p2);
        System.out.println(d);

        double d2 = p2.distance(6, 8);
        System.out.println(d2);
           //p2到原点的距离
        double d3 = p2.distance();
        System.out.println(d3);
    }

    public void test04(){

        return ;
    }
}
